<?php

namespace App\Admin\Repositories\System;

use App\Models\System\Setting as Model;
use Dcat\Admin\Repositories\EloquentRepository;

class Setting extends EloquentRepository
{
    /**
     * Model.
     *
     * @var string
     */
    protected $eloquentClass = Model::class;

    public function select_list()
    {
        $list = $this->eloquentClass::where('parent_id', 0)->get()->pluck('title', 'id')->toArray();
        $list['0'] = "顶级标题";
        ksort($list);
        return $list;
    }
}
